@charset "utf-8";

@import "../lib/ol/ol.css";
@import "iconfont/iconfont.css";
@import "index";
@import "rorate";

#map{
  @extend %full-container;
  background-color: rgba(0,0,0,.5);
}
//地图全图
#map:-moz-full-screen {
  height: 100%;
  width: 100%;
}
#map:-webkit-full-screen {
  height: 100%;
  width: 100%;
}
#map:-ms-fullscreen {
  height: 100%;
  width: 100%;
}
#map:fullscreen {
  height: 100%;
  width: 100%;
}

$padding-size: 12px;
$main-color: rgba(0,60,136,.5);

%box-border{
  box-shadow: 1px 1px 2px #ccc;
  border:1px solid #ccc;
}

%box-border-radius{
  @extend %box-border;
  border-radius: 4px;
}

.control-zoom,
.control-zoom-extent,
.control-full-screen{
  position: absolute;
  right: $padding-size;
  padding: 3px;
  font-size: 18px;

}
.control-zoom{
  bottom: 175px;
}
.control-zoom-extent{
  bottom: 242px;
}
.control-full-screen{
  top: $padding-size;
  right: 205px;
}
.ol-zoomslider{
  padding: 3px;
  position: absolute;
  left: 12px;
  top: 117px;
  height: 100px;
  width: 30px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  &:before{
    content: " ";
    position: absolute;
    background: $main-color;
    top: 4px;
    left: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 2px;
  }
  .ol-zoomslider-thumb{
    width: 24px;
    left: 2px;
    background-color: rgba(0, 60, 136, .85);
  }
}

.control-mouse-position{
  position: absolute;
  bottom: $padding-size;
  left: calc(50% - 30px);
  color: $main-color;
  font-weight: bold;
}

.control-scale-line{
  position: absolute;
  bottom: 12px;
  left: 12px;
  border: 2px solid $main-color;
  border-top: none;
  text-align: center;
  color: $main-color;
  font-weight: bold;
  background-color: rgba(255, 255, 255, .3);
}
.ol-overviewmap{
  position: absolute;
  right: $padding-size;
  bottom: $padding-size;
  left: auto;
  padding: 0;
  margin: 0;
  button{
    top: 0;
    bottom: auto;
    font-size: 18px;
  }
}
.ol-overviewmap-box{
  border: 2px dotted rgb(255, 0, 0);
}
.control-basemap{
  position: absolute;
  top:$padding-size;
  right: $padding-size;
  background: rgba(255, 255, 255, 1);
  border-radius: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border:1px solid $main-color;
  li{
    float: left;
    line-height: 34px;
    height: 34px;
    text-align: center;
    width: 60px;
    border-left: 1px solid $main-color;
    cursor: pointer;
    font-size: 15px;
    &.active{
      background-color: $main-color;
      color: white;
    }
    &:first-child{
      border-top-left-radius: 4px;
      border-bottom-left-radius: 4px;
      border: none;
    }
    &:last-child{
      border-top-right-radius: 4px;
      border-bottom-right-radius: 4px;
    }
  }
}

.control-measure-tools{
  position: absolute;
  top: $padding-size;
  right: 205px;
  background: rgba(255, 255, 255, .5);
  border-radius: 4px;
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow: hidden;
  li {
    float: left;
    line-height: 28px;
    height: 28px;
    text-align: center;
    background-color: rgba(0, 60, 136, 0.5);
    cursor: pointer;
    font-size: 15px;
    width: 30px;
    color: white;
    margin-left: 1px;
    &:hover{
      background-color: rgba(0, 60, 136, 0.71);
    }
    &.active{
      background-color: rgba(0, 60, 136, 0.9);
      color: white;
    }
    &:first-child{
      border-top-left-radius: 4px;
      border-bottom-left-radius: 4px;
      border: none;
      margin-left: 0;
    }
    &:last-child{
      border-top-right-radius: 4px;
      border-bottom-right-radius: 4px;
    }
  }
}

.control-legend{
  position: absolute;
  left: $padding-size;
  bottom: 40px;
  z-index: 99;
  padding: 0;
  margin: 0;
  list-style: none;
  @extend %box-border;
  background-color: rgba(255,255,255,.85);
  li{
    &.title{
      text-align: center;
      cursor: pointer;
      line-height: 26px;
      height: 26px;
      padding: 0 10px;
      font-weight: bold;
      font-size: 14px;
      border-bottom: 1px solid #ccc;
    }
    &.layer{
      h5{
        padding: 3px 5px;
        margin: 0;
        font-weight: bold;
      }
      ul.legends{
        list-style: none;
        margin: 0;
        padding: 0;
        overflow: hidden;
        li.legend{
          padding: 3px 8px;
          min-width: 80px;
          span{
            display: inline-block;
            width: 10px;
            height: 10px;
            margin-right: 5px;
            margin-left: 12px;
          }
        }
      }
    }
  }
}

.tooltip {
  position: relative;
  color: black;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.8);
  height: 20px;
  line-height: 20px;
  padding: 0 5px;
  border: 1px solid #ccc;
  span.close{
    cursor: pointer;
    line-height: 20px;
    height: 20px;
    display: inline-block;
    margin-left: 5px;
  }
}